import request from '@/utils/request'

// 查询舱单申报头列表
export function listMftManifestHead(query) {
  return request({
    url: '/swdecl/orginMftHead/mftList',
    method: 'get',
    params: query
  })
}


export function listMftManifest(query) {
  return request({
    url: '/swdecl/orginMftHead/list',
    method: 'get',
    params: query
  })
}

// 查询舱单申报头详细
export function getMftManifestHead(id) {
  return request({
    url: '/swdecl/orginMftHead/getInfo/' + id,
    method: 'get'
  })
}


// 新增舱单申报头
export function addMftManifestHead(data) {
  return request({
    url: '/swdecl/orginMftHead/add',
    method: 'post',
    data: data
  })
}

// 修改舱单申报头
export function updateMftManifestHead(data) {
  return request({
    url: '/swdecl/orginMftHead/edit',
    method: 'post',
    data: data
  })
}

// 删除舱单申报头
export function delMftManifestHead(id) {
  return request({
    url: '/swdecl/orginMftHead/remove/' + id,
    method: 'get'
  })
}

// 导出舱单申报头
export function exportMftManifestHead(query) {
  return request({
    url: '/swdecl/orginMftHead/export',
    method: 'get',
    params: query
  })
}

// 舱单申报
export function declMftManifestHead(id) {
  return request({
    url: '/swdecl/orginMftHead/addDecl/' + id,
    method: 'get'
  })
}

// 变更申报
export function updateMftManifestDecl(id) {
  return request({
    url: '/swdecl/orginMftHead/modifyDecl/' + id,
    method: 'get'
  })
}

// 删除申报
export function deleteMftManifestDecl(data) {
  return request({
    url: '/swdecl/orginMftHead/revokeDecl',
    // url: '/bt/orginMftHead/mftDelDecl/' + id,
    method: 'post',
    data
  })
}

